
#include "stm32f10x.h"
#include "Prj_Inc.h"






int main(void)
{
    int KeyType;
    int beep_on = 0;
    
    System_Init();




    while(1)
    {
        KeyType = Key_Scan();
        if(KeyType == KEY_1)
        {
            if(LED_GetLEDStatus(LED_YELLOW))
            {
                LED_SetLEDStatus(LED_YELLOW, 0);
            }
            else
            {
                LED_SetLEDStatus(LED_YELLOW, 1);
            }
        }
        else if(KeyType == KEY_2)
        {
            if(LED_GetLEDStatus(LED_RED))
            {
                LED_SetLEDStatus(LED_RED, 0);
            }
            else
            {
                LED_SetLEDStatus(LED_RED, 1);
            }
        }
        else if(KeyType == KEY_3)
        {
            if(beep_on)
            {
                Beep_SetStatus(0);
            }
            else
            {
                Beep_SetStatus(1);
            }
            beep_on = !beep_on;
        }
    }

    return 0;
}

